$gray: #fff;
$blue: #fff;
//@mixi那是混入 复用的css声明
@mixin colorBtn($color) {
  background: $color;

  &:hover {
    color: $color;

    &:before,
    &:after {
      background: $color;
    }
  }
}

.gray-btn {
  @include colorBtn($gray)
}

.blue-btn {
  @include colorBtn($blue)
}

.pan-btn {
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  color: #000;
  padding: 8px 35px;
  border-radius: 8px;
  border: none;
  outline: none;
  transition: 600ms ease all;
  position: relative;
  display: inline-block;
   //&代表父级选择器
  &:hover {
    background: #5414d3;
    &:before,
    &:after {
      width: 100%;
      transition: 600ms ease all;
    }
  }

  &:before,
  &:after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 2px;
    width: 0;
    transition: 400ms ease all;
  }

  &::after {
    right: inherit;
    top: inherit;
    left: 0;
    bottom: 0;
  }
}
